package com.tracker.impl;

import java.util.Set;
import com.tracker.bean.AccountUser;
import com.tracker.session.AccountUserSession;



public class AccountUserImpl {
	
	public void save(AccountUser accountUser) {
		try {
			System.out.println("######################### "+ this.getClass().getSimpleName()+ "->SAVE  ########################");
			(new AccountUserSession()).add(accountUser);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public AccountUser get(AccountUser accountUser) {
		try {
			System.out.println("######################### "+ this.getClass().getSimpleName()+ "->GET  ########################");
			return (new AccountUserSession()).get(accountUser);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

	public AccountUser getById(AccountUser accountUser) {
		try {
			System.out.println("######################### "+ this.getClass().getSimpleName()+ "->GET  ########################");
			return (new AccountUserSession()).getById(accountUser);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

	public Set list() {
		try {
			System.out.println("######################### "+ this.getClass().getSimpleName()+ "->LIST  ########################");
			return (new AccountUserSession()).list();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

	public void remove(AccountUser accountUser) {
		try {
			System.out.println("######################### "+ this.getClass().getSimpleName()+ "->LIST  ########################");
			(new AccountUserSession()).delete(accountUser);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
